﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Approval.aspx.cs" Inherits="MarketPayReim.Approval" %>

<%@ Register Src="../../Processes/ProcessControl/UserInfo_TY.ascx" TagName="UserInfo"
    TagPrefix="ui" %>
<%@ Register Src="../../Processes/ProcessControl/ApprovalHistory_TY.ascx" TagName="ApprovalHistory"
    TagPrefix="ah" %>
<%@ Register Src="../../Processes/ProcessControl/Attachments_TY.ascx" TagName="Attachments"
    TagPrefix="attach" %>
<%@ Register Src="../../Processes/ProcessControl/ButtonList_TY.ascx" TagName="ButtonList"
    TagPrefix="btn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>销售类采购资金支付及发票报销</title>
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            var sum = 0
            $("#mytable").find("tr:gt(0)").each(function (i, Etr) {
                sum += $(Etr).find("td").eq(8).find("span").text() - 0;
            });
            $("#fld_PAY").text(sum);
            $("#fld_PAYUPPER").text(ChangeRMBToCH(sum.toString()));

            var type = $("#fld_TABLETYPE").text();
            if (type == "资金支付类") {
                $("#DivContract").css("display", "none");
                $("#DivMoney").css("display", "");
            }
            if (type == "发票报销类") {
                $("#DivContract").css("display", "");
                $("#DivMoney").css("display", "none");
            }
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
        <div class="row">
            <ui:userinfo id="UserInfo1" processprefix="MPR" readonly="true" processtitle="销售类采购资金支付及发票报销"
                tablename="PROC_MARKETPAYREIM" tablenamedetail="PROC_MARKETPAYREIM_DETAIL" runat="server"></ui:userinfo>
        </div>
        <div class="row">
            <table class="table table-condensed table-bordered">
                <thead class="table table-condensed table-bordered">
                    <tr>
                        <td class="banner" colspan="4">
                            <asp:Label ID="fld_TABLETYPE" Text="" runat="server"></asp:Label>
                        </td>
                    </tr>
                </thead>
                <tbody id="DivMoney" class="table table-condensed table-bordered">
                    <tr>
                        <td class="td-label">
                            表单类别
                        </td>
                        <td class="td-content" colspan="3">
                            资金支付类
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            是否在预算内：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_BUDGET" runat="server"></asp:Label>
                        </td>
                        <td class="td-label">
                            选择中心审批：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_CENTERCAPTITAL" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            付款金额：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_PAY" runat="server" Text=""></asp:Label>
                        </td>
                        <td class="td-label">
                            付款金额大写：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_PAYUPPER" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            开户行：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_KHH" runat="server"></asp:Label>
                        </td>
                        <td class="td-label">
                            银行卡号：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_YHKH" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            付款信息：
                        </td>
                        <td class="td-content" colspan="3">
                            <asp:Label ID="fld_PAYINFO" runat="server"></asp:Label>
                        </td>
                        <%--                        <td class="td-label">
                            销售合同号：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_MARKETCONTRACTNO" runat="server"></asp:Label>
                        </td>--%>
                    </tr>
                    <tr>
                        <td class="td-label">
                            选择相关人员：
                        </td>
                        <td class="td-content" colspan="3">
                            <asp:Label ID="fld_RELATEPERSON" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="11">
                            <table id="mytable" class="table table-condensed table-bordered">
                                <tr>
                                    <th>
                                        合同编号
                                    </th>
                                    <th>
                                        供应商名称
                                    </th>
                                    <th>
                                        内容
                                    </th>
                                    <th>
                                        合同金额
                                    </th>
                                    <th>
                                        合同数量
                                    </th>
                                    <th>
                                        入库数量
                                    </th>
                                    <th>
                                        已开票金额
                                    </th>
                                    <th>
                                        已付金额
                                    </th>
                                    <th>
                                        本次所需金额
                                    </th>
                                    <th>
                                        预计付款时间
                                    </th>
                                </tr>
                                <asp:Repeater ID="fld_detail_PROC_MARKETPAYREIM_DETAIL" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td class="td-content">
                                                <asp:Label ID="fld_FORMID" Text='<%#Eval("FORMID") %>' runat="server" Style="display: none"></asp:Label>
                                                <asp:Label ID="fld_CONTARTNO" Text='<%#Eval("CONTARTNO") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_SUPPLIER" Text='<%#Eval("SUPPLIER") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_CONTENT" Text='<%#Eval("CONTENT") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_CONTRACTCAPTITAL" Text='<%#Eval("CONTRACTCAPTITAL") %>' runat="server"
                                                    Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_CONTRACTQTY" Text='<%#Eval("CONTRACTQTY") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_SUPPLIERQTY" Text='<%#Eval("SUPPLIERQTY") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_YKPJE" Text='<%#Eval("YKPJE") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_AMOUNT" Text='<%#Eval("AMOUNT") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_REQUIRED" Text='<%#Eval("REQUIRED") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                            <td class="td-content">
                                                <asp:Label ID="fld_PAYTIME" Text='<%#Eval("PAYTIME") %>' runat="server" Width="80%"></asp:Label>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </tbody>
                <tbody id="DivContract" style="display: none;" class="table table-condensed table-bordered">
                    <tr>
                        <td class="td-label">
                            表单类别
                        </td>
                        <td class="td-content" colspan="3">
                            发票报销类
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            发票所属公司：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_INVOICECOMPANY" runat="server"></asp:Label>
                        </td>
                        <td class="td-label">
                            选择中心审批：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_CENTERINVOICE" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            发票金额：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_INVOICECAPTITAL" runat="server"></asp:Label>
                        </td>
                        <td class="td-label">
                            发票金额大写：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_INVOICEUPPER" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="td-label">
                            发票信息：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_INVOICEINFO" runat="server"></asp:Label>
                        </td>
                        <td class="td-label">
                            发票号：
                        </td>
                        <td class="td-content">
                            <asp:Label ID="fld_INVOICENO" runat="server"></asp:Label>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="row">
            <attach:attachments id="Attachments1" runat="server" readonly="true"></attach:attachments>
        </div>
        <div class="row">
            <ah:approvalhistory id="ApprovalHistory1" runat="server"></ah:approvalhistory>
        </div>
        <div class="row">
        </div>
    </div>
    <btn:buttonlist id="ButtonList1" runat="server"></btn:buttonlist>
    <div style="display: none;">
    </div>
    </form>
</body>
</html>
